Add deficon to geo output.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 21 Dec 2003 07:53:15 +0000 (07:53 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 21 Dec 2003 07:53:15 +0000 (07:53 +0000)
gpsbabel/geo.c

index c68fe19152091d9264a875a8f80d5af840b3f5ef..171a9546a301d63daa0bbc820166951000438e2e 100644 (file)
@@ -29,12 +29,19 @@ static int in_type;
 static int in_cdata;
 static char *cdatastr;
 static char *typestr;
+static char *deficon;
 
 static waypoint *wpt_tmp;
 
 FILE *fd;
 FILE *ofd;
 
+static
+arglist_t geo_args[] = {
+       {"deficon", &deficon, "Default icon name", ARGTYPE_STRING },
+       {0, 0, 0, 0}
+};
+
 #define MYNAME "geo"
 #define MY_CBUF 4096
 
@@ -265,7 +272,7 @@ geo_waypt_pr(const waypoint *waypointp)
        fprintf(ofd, "\n");
 
        if (waypointp->icon_descr) {
-               fprintf(ofd, "<type>%s</type>\n", waypointp->icon_descr);
+               fprintf(ofd, "<type>%s</type>\n", deficon ? deficon : waypointp->icon_descr);
        }
        if (waypointp->url) {
                tmp = xml_entitize(waypointp->url);
@@ -291,5 +298,5 @@ ff_vecs_t geo_vecs = {
        geo_wr_deinit,
        geo_read,
        geo_write,
-       NULL
+       geo_args
 };